	#set($key="$!request.params.get('q')")
	
	<div class="wrap mt">
		<!-- 主体部分 -->
		<div class="cp_tier mt">
            <span class="fr mr">共检索到<strong class="cp_tier_rt" id="numFound"> $page.results_found条 </strong>#if($key!='')关于"$key"的#end记录</span>
            <a href="http://china.huisou.com/" title="商务网首页" target="_blank">会搜商务网</a>&gt;<a href="http://china.huisou.com/so/sale/index.html" target="_blank" title="产品">产品</a>&gt; 
        </div>
		<div class="grid-m0s200 clearfix mt">
			<div class="col-main">
				<div class="main-wrap"> 
                       #if($response.facetFields && $response.facetFields.get(0).values.size()>0)
							#foreach($field in $response.facetFields)
								#if($field.values)
									<div class="classnav p-rela">
									<div class="classnav-body clearfix">
									<div class="classnav-l fl"><strong>#facetTitle($field.name):</strong></div>
									 <ul class="classnav-r fl wid712 clearfix">     
									 	#foreach($facet in $field.values)
											<li class="classnav-li">
												<a class="classsnav-a" title="#facetName($n,$t)" target="_self" href="#url_for_facet_filter($field.name, $facet.name)">#facetName($facet.name,$field.name)</a>
												<span class="classnav-grey">($facet.count)</span>
											</li>
										#end
									 </ul>									 
									</div>
									<div class="classnav-instru p-abso">
			                           	<div class="classnav-more">更多<i class="i-pyramid"></i></div>
			                        	<div class="classnav-more hide" style="display: none;">收起<i class="i-pyramid i-pyramidsec"></i></div>
			                        </div>
								    </div> 
								#end
							#end
						#end
                       <div class="res-do mt p-rela">
                       	<ul class="resdo-ul clearfix">
                           	<li class="resdo-li01">
                               	<a title="搜索关键字  ${key}" href="">${key}</a>
                               </li>
                               <li class="resdo-li02 resdo-lion">
                               	<a title="点击搜索相关企业" href="#">产品</a>
                               </li>
                               <li class="resdo-li03">
                               	<a title="点击搜索相关企业" href="">企业</a>
                               </li>
                               <li class="resdo-li04">
                               	<a title="点击搜索相关商机" href="">商机</a>
                               </li>
                               <li class="resdo-li05">
                               	<a title="点击搜索相关生意经" href="">生意经</a>
                               </li>
                               <li class="resdo-li06">
                               	<a title="点击搜索相关价格行情" href="">价格行情</a>
                               </li>
                               <li class="resdo-li07">
                               	<a title="点击搜索相关资讯" href="">资讯</a>
                               </li>
                               <li class="resdo-li08">
                               	<div class=" clearfix">
                                   	<div class="resdo-line resdo-ml30 fl">
                                       <a class="idoa iaon" id="list" title="点击以列表形式展现" href="#" OnClick="setshowmodel('list');submitSearch();">
                                           <i class="ires-list"></i>列表
                                       </a>
                                     </div>
                                     <div class="resdo-line fl">
                                       <a class="idoa" id="win" title="点击以橱窗形式展现" href="#" OnClick="setshowmodel('win');submitSearch();">
                                           <i class="ires-block"></i>橱窗
                                       </a>
                                     </div>
                                     <input type="hidden" value="$!request.params.get('win')" id="showmodel" />
                                 </div>
                               </li>
                           </ul>
                           <div class="res-innerdo clearfix">
                            	<div class="fl">
                                    <ul class="res-ido-ul clearfix">
                                        <li class="resi-area-li">
                                            #parse("common/area.htm")
                                        </li>
                                        <li class="resi-area-li">
                                            <div class="resi-mode p-rela">
                                                <div class="s_nav_area_title" id="bizModelText">经营模式</div>
                                                <input type="hidden" id="bizModel" value="$!request.params.get('ome')" />
                                                <i class="resi-opyramid"></i>
                                            	<ul class="resi-mode-ul p-abso">
                                                	<li class="resi-li-one">
                                                    	<a href="#" OnClick="setbizModel('7');submitSearch();">生产加工</a>
                                                    </li>
                                                    <li class="resi-li-one">
                                                    	<a href="#" OnClick="setbizModel('8');submitSearch();">经销批发</a>
                                                    </li>
                                                    <li class="resi-li-one">
                                                    	<a href="#" OnClick="setbizModel('9');submitSearch();">招商代理</a>
                                                    </li>
                                                    <li class="resi-li-one">
                                                        <a href="#" OnClick="setbizModel('10');submitSearch();">商业服务</a>
                                                    </li>
                                                    <li class="resi-li-one">
                                                        <a href="#" OnClick="setbizModel('11');submitSearch();">其它</a>
                                                    </li>
                                                </ul>                                                
                                            </div>
                                        </li>
                                        <li class="resi-area-li">
                                        	<input type="checkbox" id="tomix" name="resi-huipi" OnClick="submitSearch();" />
                                            <label for="tomix">混批</label>
                                        </li>
                                        <li class="resi-area-li">
                                            <span class="fl ml mr">价格
                                            </span>
                                            <a id="sortasc" class="resi-asc fl" OnClick="setsort('1');submitSearch();"></a>
                                            <a id="sortdesc" class="resi-desc fl" OnClick="setsort('2');submitSearch();"></a>
                                            <input type="hidden" value="$!request.params.get('srt')" id="sort" />
                                        </li>
                                        <li class="resi-area-li">
                                            <div class="resi-price fl">
                                                <input type="text" id="lowprice" onblur="submitSearch();" onfocus="if(this.value=='最低价'){this.value=''}" value="最低价" class="resi-price-inp" />
                                                -
                                                <input type="text" id="topprice" onblur="submitSearch();" onfocus="if(this.value=='最高价'){this.value=''}" value="最高价" class="resi-price-inp" />
                                            </div>
                                         </li>   
                                    </ul>
                                </div>
                                <div class="resi-che fr">
                                	<input type="checkbox" id="vip" name="condition" OnClick="submitSearch();" /><label for="vip">&nbsp;认证企业</label>
                                    <input type="checkbox" id="grouped" name="condition" OnClick="submitSearch();"/><label for="grouped">&nbsp;合并相同企业产品</label>
                                </div>
                            </div>
                       </div> <!--res-do-->
                       
                       <div class="res-pic01 clearfix mt p-rela" id="key-list"> 
                           
                       </div> <!-- res-pic01 -->
                       <div class="res-remote clearfix">
                       	<a class="fr" href="http://key.huisou.com/" target="_blank">我要推广</a>
                       	<i class="ires-remo">
                           </i>
                       </div>                       
                       <div class="res-list mt">
                       		#if($response.response.get('grouped'))
								#parse("sale/group.vm")
							#else
								#if($request.params.get('win')=="win")
				            		#parse("sale/win.htm")  
					    		#else					    							    			
	                       			#parse("sale/list.htm")
	                       		#end							                      		
                       		#end
                       </div>
                       
                       #if($page.results_found>0)			           
				           <div class="mt turn">
								<ul class="s_pages clearfix">
									 #page_links
									<li>共$pageSum页&nbsp;&nbsp;到<input type="text" class="pagenum" id="btnpn"/>页&nbsp;&nbsp;<input type="button" value="确 定" class="pagebtn" onclick="gotoPage($page.page_count,$page.results_per_page,'#btn_link_to')"/></li>
								</ul>
								<script type="text/javascript">
								function gotoPage(page,size,url)
								{
									var pn = $("#btnpn").val();
									if(pn==''||isNaN(pn))
									{
									   alert("请输入页号");
									   return ;
									}
									var ipn = parseInt(pn);
									if(ipn<1||ipn>page)
									{
										alert("超出页数范围了");
										return;
									}
									var start = (parseInt(pn)-1)*size;
									document.location = url+start+".html";
								}
								</script>
							</div>
				      #else
						     <div class="clearfix">
							      <br/>
							      <p>抱歉，没有找到符合"<span style="color:red">$key</span>"的查询结果。</p>
							      <br/>
							 </div>
						     <br/>
					  #end
                       
                       <div class="s-integrated clearfix mt">
                            <form onsubmit="return checkSub('fkeyipt');" method="post" name="form2">
                            <strong>综合搜索</strong>
                            <div class="s-bg integrated-box clearfix fl">
                                <div class="Bbrace fl">
                                    <div class="s-bg igd formsel">产 品</div>
                                    <ul class="itger-sild so-bra-ls hide" id="bstpl" style="display: none;">
                                        <li aurl="sale" style="display: none;">产 品</li>
                                        <li aurl="company">公 司</li>
                                        <li aurl="job">招 聘</li>
                                        <li aurl="fwww">网 页</li>
                                        <li aurl="fvideo">视 频</li>
                                        <li aurl="fimg">图 片</li>
                                    </ul>
                                </div>
                                <input type="text" id="fkeyipt" class="s-bg searchTXT itgr-txt" value="请输入产品名称">
                                <input type="hidden" class="stype" id="ftype" value="sale">
                                <input type="submit" class="s-bg itger-btn" value="搜索">
                            </div>
                            </form>
                        </div><!-- res-sear -->                       
                   #parse("common/rmd_prods.htm")                       
                   </div>
			</div>
			<div class="col-sub">
				<div class="search_zone">
					<div class="borders">
						<div class="title">
							<h4>一站式搜索</h4>
						</div>
						<div class="con">
							<ul>
								<li class="on"><i class="company fl"></i><a target="_blank" href="http://china.huisou.com/so/company/k-${key}.html">企业</a></li>
								<li><i class="web fl"></i><a href="javascript:gotoOtherSite('${key}','swww');">网页</a></li>
								<li><i class="photo fl"></i><a href="javascript:gotoOtherSite('${key}','simg');">图片</a></li>
								<li><i class="video fl"></i><a href="javascript:gotoOtherSite('${key}','svideo');"> 视频</a></li>
								<li><i class="news fl"></i><a target="_blank" href="http://china.huisou.com/so/news/k-${key}.html">资讯</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="com-hot mt">
					<div class="title">
							<h4>热门搜索</h4>
					</div>
					<div class="com-hotcon mt">
						<ul id="hotsearch" class="clearfix"></ul>
					</div>
				</div>
                <span id="imgads"></span>
                <span id="history"></span>                   
			</div>                
		</div>
	</div>
	
	<script type="text/javascript">
		var rooturl = "http://china.huisou.com/so/";
		$(function(){		    
			var sid = "$!request.params.get('sid')";
			if(sid!=""){
				$("#area_result_province_id").val(sid);
				$.getJSON(rooturl+"getareaname.htm?id="+sid, function(result){
					$("#area_result_province_html").text(result[0]);
				});
			}
			var cid = "$!request.params.get('cid')";
			if(cid!=""){
				$("#area_result_city_id").val(cid);
				$.getJSON(rooturl+"getareaname.htm?id="+cid, function(result){
					$("#area_result_city_html").text(result[0]);
				});
			}
			
			var sort = "$!request.params.get('srt')";
			if(sort=='1'){
				// 价格从低到高
				$("#sortasc").addClass("resi-ascon");
			}else if(sort=='2'){
				// 价格从高到低
				$("#sortdesc").addClass("resi-ascon");
			}
			
			var bizModel = "$!request.params.get('ome')";
			if(bizModel=='7'){
				$("#bizModelText").text("生产加工");
			}else if(bizModel=='8'){
				$("#bizModelText").text("经销批发");
			}else if(bizModel=='9'){
				$("#bizModelText").text("招商代理");
			}else if(bizModel=='10'){
				$("#bizModelText").text("商业服务");
			}else if(bizModel=='11'){
				$("#bizModelText").text("其它");
			}
			
			var tomix = "$!request.params.get('tomix')";
			if(tomix=='1'){
				$("#tomix").attr("checked", true);
			}else{
				$("#tomix").removeAttr("checked");
			}
			
			var vip = "$!request.params.get('vip')";
			if(vip=='1'){
				$("#vip").attr("checked", true);
			}else{
				$("#vip").removeAttr("checked");
			}
			
			var grouped = "$!request.params.get('g')";
			if(grouped=='1'){
				$("#grouped").attr("checked", true);
			}else{
				$("#grouped").removeAttr("checked");
			}
			
			var lprice = "$!request.params.get('lprice')";
			if (lprice != "") {
				$("#lowprice").val(lprice);
			}
			var hprice = "$!request.params.get('hprice')";
			if (hprice != "") {
				$("#topprice").val(hprice);
			}
			
			var showmodel = "$!request.params.get('win')";
			if(showmodel=='win'){
				// 橱窗
				$("#win").addClass("iaon");
				$("#list").removeClass("iaon");
			}
			
		});
	
		function submitSearch(){
			var url=rooturl+"sale/"
			var key = encodeURI("$!request.params.get('q')");
			key = key.replace("-", "=2D")
			if (key != ""){
				url += "k-" + key;
			}
			
			var provinceid=$("#area_result_province_id").val();
			if (provinceid!=null && provinceid != '' && provinceid!='0'){
				url += "_s-" + provinceid;
			}
			
			var cityid=$("#area_result_city_id").val();
			if (cityid!=null && cityid!='' && cityid != '0'){
				url += "_c-" + cityid;
			}
			
			var bizModel = $("#bizModel").val();
			if(bizModel!='' && bizModel!='0'){
				url += "_m-"+bizModel;
			}
			
			var sort = $("#sort").val();
			if(sort!=null && sort!=''){
				url += "_o-"+sort;
			}
			
			if($("#tomix").attr("checked")){
				url += "_x-1";
			}
			
			if($("#vip").attr("checked")){
				url += "_v-1";
			}
			
			if ($("#lowprice") && $("#lowprice").val() != '' && $("#lowprice").val() != '最低价'){  
				url += "_l-" + $("#lowprice").val();
			}
			
			if ($("#topprice") && $("#topprice").val() != '' && $("#topprice").val() != '最高价'){  
				url += "_h-" + $("#topprice").val();
			}
			
			if($("#showmodel").val()=='win'){
				url += "_w-win";
			}
			
			if($("#grouped").attr("checked")){
				url += "_g-1";
			}
			
			var pid = "$!request.params.get('pid')";
			if(pid!=''){
				url += "_p-"+pid;
			}
			
			window.location.href = url + ".html";
			return false;
		}
		
		function setarea(sid,cid){
			$("#area_result_province_id").val(sid);
			$("#area_result_city_id").val(cid);
		}
		
		function setbizModel(val){
			$("#bizModel").val(val);
		}
		
		function setsort(val){
			$("#sort").val(val);
		}
		
		function setshowmodel(val){
			$("#showmodel").val(val);
		}
	</script>